package org.rslai.autotest.core.page.impl;

import org.rslai.autotest.core.page.Image;
import org.rslai.util.md5.MD5;

/**
 * 图片处理工具实现
 * @author rslai
 */
public class ImageImpl implements Image{

	@Override
	public boolean contrastByMD5(String firstFileName, String secondFileName) throws Exception {
		MD5 md5 = MD5.getInstance();
		String image1 = md5.getMd5ByFile(firstFileName);
		String image2 = md5.getMd5ByFile(secondFileName);
		if (image1.equals(image2)) {
			return true;
		} else {
			return false;
		}
	}

}
